#ifndef MAINCONTROL_H
#define MAINCONTROL_H

#include <QObject>

#include "head.h"
#include "savefilethread.h"

class MainControl : public QObject
{
    Q_OBJECT
public:
    explicit MainControl(SettingsData settingsData, QObject *parent = nullptr);
    ~MainControl();

signals:
    void signal_saveFileWork(const QString ip, const quint16 port, const QByteArray arr);

public:
    void initThread();

    void startThread();

    void stopThread();

    void setConfig(const QVector<WINDOW_CONFIG>& configs, int validNum);

public slots:
    void onSettingsData(const SettingsData& settingsData);

private:
    //QThreadPool m_threadPool;

    QVector<QThread*> m_threads;

    SettingsData m_settingsData;        //存储传过来的参数数据

    QVector<WINDOW_CONFIG> m_videoConfigs;

    int m_validNum;     //有效的数据个数
};

#endif // MAINCONTROL_H
